export function success(data: any, message='请求成功') {
  return {
    code: 0,
    result:data,
    message,
  };
}
export function errorReq(message: string) {
  return {
    code: -1,
    message,
    result:null
  }
}
export function warpperResponse(req ,msg) {
  return req.then((data)=>success(data,msg)).catch((err)=>errorReq(err.message))
}